<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
<title>案件挂起管理</title>
<meta name="decorator" content="default" />
<script type="text/javascript">
	$(document).ready(function() {

	});
	function page(n, s) {
		$("#pageNo").val(n);
		$("#pageSize").val(s);
		$("#searchForm").submit();
		return false;
	}
	function remark(remarkInfo) {
		$("#remark").css("display", "block");
		$("#remark").children("p").html("");
		$("#remark").children("p").append(remarkInfo);
	}
	function remarkOff() {
		$("#remark").css("display", "none");
	}
</script>
<style type="text/css">
#remark {
	margin-left: 20%;
	margin-top: 10%;
	width: 400px;
	height: 250px;
	background-color: #fff;
	border: 1px solid #ccc;
	position: fixed;
	left: 0;
	top: 0;
}
</style>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/ta/xtSuspendApply/">案件挂起列表</a></li>
	</ul>
	<form:form id="searchForm" modelAttribute="xtSuspendApply"
		action="${ctx}/ta/xtSuspendApply/" method="post"
		class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}" />
		<input id="pageSize" name="pageSize" type="hidden"
			value="${page.pageSize}" />
		<ul class="ul-form">
			<li><label>挂起编号：</label> <form:input path="serial"
					htmlEscape="false" maxlength="512" class="input-medium" /></li>
			<li><label>状态：</label> <select name="isdelete"
				class="input-medium">
					<option value="">全部</option>
					<option value="0">已通过</option>
					<option value="1">审核中</option>
					<option value="2">未通过</option>
					<option value="3">已取消</option>
			</select></li>
			<li><label>挂起时间从：</label> <input name="applyTime" type="text"
				readonly="readonly" maxlength="20" class="input-medium Wdate"
				onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});" />
				<label>到：</label> <input name="endTime" type="text"
				readonly="readonly" maxlength="20" class="input-medium Wdate"
				onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});" />
			</li>
			<li class="btns"><input id="btnSubmit" class="btn btn-primary"
				type="submit" value="查询" /></li>
			<li class="clearfix"></li>
		</ul>
	</form:form>
	<sys:message content="${message}" />
	<table id="contentTable"
		class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th>挂起编号</th>
				<th>挂起类型</th>
				<th>挂起人</th>
				<th>挂起时间</th>
				<th>挂起内容</th>
				<th>操作</th>
			</tr>
		</thead>
		<tbody>
			<%-- <c:if test="${page.list}"></c:if> --%>
			<c:forEach items="${page.list}" var="xtSuspendApply">
				<tr>
					<td>${xtSuspendApply.serial}</td>
					<td><c:if test="${xtSuspendApply.suspendType == 0}">用户原因</c:if>
						<c:if test="${xtSuspendApply.suspendType == 1}">上报上级部门</c:if> <c:if
							test="${xtSuspendApply.suspendType == 2}">其他原因</c:if></td>
					<td>${xtSuspendApply.user.name}</td>
					<td><fmt:formatDate value="${xtSuspendApply.applyTime}"
							pattern="yyyy-MM-dd HH:mm:ss" /></td>
					<td><a href="javascript:remark('${xtSuspendApply.memo }')">查看说明</a></td>
					<td><c:if test="${xtSuspendApply.isdelete == 0}">已通过</c:if> <c:if
							test="${xtSuspendApply.isdelete == 3}">已取消</c:if> <c:if
							test="${xtSuspendApply.isdelete == 1}">
							<a
								href="${ctx}/ta/stSuspend/saveStSuspend?iid=${xtSuspendApply.serial}"
								onclick="return confirmx('确认要通过该案件挂起吗？', this.href)">通过</a>
							<a href="${ctx}/ta/xtSuspendApply/update?id=${xtSuspendApply.id}"
								onclick="return confirmx('确认要不通过该案件挂起吗？', this.href)">不通过</a>
						</c:if> <c:if test="${xtSuspendApply.isdelete == 2}">未通过</c:if></td>
				</tr>
			</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
	<div id="remark" style="display: none;">
		<h4 align="center" style="margin-top: 2%">回退说明：</h4>
		<input type="button" value="X"
			style="float: right; margin-top: -28px; background-color: #fff; border: none;"
			onclick="remarkOff()" />
		<p align="left"
			style="width: 360px; height: 180px; border: 1px solid #ccc; margin-left: 5%; margin-top: 1%"></p>
		<div align="right" style="padding-right: 10px;"><input type="button" value="关闭" onclick="remarkOff()"/></div>
	</div>
</body>
</html>